# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
import cv2
import numpy as np
while True:
    img = np.zeros((500,500,3), dtype=np.uint8))
    # 绘制旋转立方体（伪3D蛋糕）
    angle = cv2.getTickCount() * 0.01
    pts = np.array([[200+50*np.cos(angle), 200+50*np.sin(angle)],
                   [300+50*np.cos(angle+np.pi/2), 200+50*np.sin(angle+np.pi/2)],
                   [300+50*np.cos(angle+np.pi), 300+50*np.sin(angle+np.pi)],
                   [200+50*np.cos(angle+3*np.pi/2), 300+50*np.sin(angle+3*np.pi/2)]], np.int32)
    cv2.polylines(img, [pts], True, (0,255,255), 3)
    cv2.imshow('Hologram', img)
    if cv2.waitKey(30) == 27: break
cv2.destroyAllWindows()